//
//  CustomActionSheetView.m
//  安好
//
//  Created by 马晓良 on 14-11-14.
//  Copyright (c) 2014年 lianchuangbrother. All rights reserved.
//

#import "CustomActionSheetView.h"

@implementation CustomActionSheetView
- (UIView *)demonstrateView{
    if (nil == _demonstrateView) {
        _demonstrateView = [[UIView alloc] initWithFrame:CGRectMake(8, 6, kScreenWidth - 16, 90)];
        _demonstrateView.backgroundColor = [UIColor clearColor];
        _demonstrateView.layer.masksToBounds = YES;
        _demonstrateView.layer.cornerRadius = 5;
        [_demonstrateView addSubview:self.lineView];
        [self addSubview:_demonstrateView];
    }
    return _demonstrateView;
}

- (UIView *)lineView{
    if (nil == _lineView) {
        _lineView = [[UIView alloc] initWithFrame:CGRectMake(0, 44, self.demonstrateView.frame.size.width, 1)];
        _lineView.backgroundColor = [UIColor lightGrayColor];
    }
    return _lineView;
}

- (UIButton *)changeHeadPortraitButton{
    if (nil == _changeHeadPortraitButton) {
        _changeHeadPortraitButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _changeHeadPortraitButton.frame = CGRectMake(0, 0, self.demonstrateView.frame.size.width, 44);
        _changeHeadPortraitButton.titleLabel.font= [UIFont systemFontOfSize:12];
        [_changeHeadPortraitButton setTitleColor:[UIColor colorWithRed:0 green:122/255.0 blue:1 alpha:1] forState:UIControlStateNormal];
        _changeHeadPortraitButton.backgroundColor = [UIColor whiteColor];
        [_changeHeadPortraitButton setTitle:@"更 换 头 像" forState:UIControlStateNormal];
        [self.demonstrateView addSubview:_changeHeadPortraitButton];
    }
    return _changeHeadPortraitButton;
}

- (UIButton *)lookBigHeadPortraitButton{
    if (nil == _lookBigHeadPortraitButton) {
        _lookBigHeadPortraitButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _lookBigHeadPortraitButton.frame = CGRectMake(0, 45, self.demonstrateView.frame.size.width, 45);
        _lookBigHeadPortraitButton.backgroundColor = [UIColor whiteColor];
        _lookBigHeadPortraitButton.titleLabel.font= [UIFont systemFontOfSize:12];
        [_lookBigHeadPortraitButton setTitleColor:[UIColor colorWithRed:0 green:122/255.0 blue:1 alpha:1] forState:UIControlStateNormal];
        [_lookBigHeadPortraitButton setTitle:@"查 看 大 头 像" forState:UIControlStateNormal];
        [self.demonstrateView addSubview:_lookBigHeadPortraitButton];
    }
    return _lookBigHeadPortraitButton;
}

- (UIButton *)cancelButton{
    if (nil == _cancelButton) {
        _cancelButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _cancelButton.frame = CGRectMake(8, self.frame.size.height - 53, kScreenWidth - 16, 45);
        _cancelButton.layer.masksToBounds = YES;
        _cancelButton.layer.cornerRadius = 5;
        _cancelButton.backgroundColor = [UIColor whiteColor];
        _cancelButton.titleLabel.font= [UIFont systemFontOfSize:12];
        [_cancelButton setTitle:@"取 消" forState:UIControlStateNormal];
        [_cancelButton setTitleColor:[UIColor colorWithRed:0 green:122/255.0 blue:1 alpha:1] forState:UIControlStateNormal];
        [self addSubview:_cancelButton];
    }
    return _cancelButton;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
@end
